package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic.mapper.BusinessTripReimbursementMapper;
import com.traffic.domain.BusinessTripReimbursement;
import com.traffic.service.IBusinessTripReimbursementService;

/**
 * 出差报销Service业务层处理
 * 
 * @author ywt
 * @date 2024-09-19
 */
@Service
public class BusinessTripReimbursementServiceImpl implements IBusinessTripReimbursementService 
{
    @Autowired
    private BusinessTripReimbursementMapper businessTripReimbursementMapper;

    /**
     * 查询出差报销
     * 
     * @param id 出差报销主键
     * @return 出差报销
     */
    @Override
    public BusinessTripReimbursement selectBusinessTripReimbursementById(Long id)
    {
        return businessTripReimbursementMapper.selectBusinessTripReimbursementById(id);
    }

    /**
     * 查询出差报销列表
     * 
     * @param businessTripReimbursement 出差报销
     * @return 出差报销
     */
    @Override
    public List<BusinessTripReimbursement> selectBusinessTripReimbursementList(BusinessTripReimbursement businessTripReimbursement)
    {
        return businessTripReimbursementMapper.selectBusinessTripReimbursementList(businessTripReimbursement);
    }

    /**
     * 新增出差报销
     * 
     * @param businessTripReimbursement 出差报销
     * @return 结果
     */
    @Override
    public int insertBusinessTripReimbursement(BusinessTripReimbursement businessTripReimbursement)
    {
        businessTripReimbursement.setCreateTime(DateUtils.getNowDate());
        return businessTripReimbursementMapper.insertBusinessTripReimbursement(businessTripReimbursement);
    }

    /**
     * 修改出差报销
     * 
     * @param businessTripReimbursement 出差报销
     * @return 结果
     */
    @Override
    public int updateBusinessTripReimbursement(BusinessTripReimbursement businessTripReimbursement)
    {
        return businessTripReimbursementMapper.updateBusinessTripReimbursement(businessTripReimbursement);
    }

    /**
     * 批量删除出差报销
     * 
     * @param ids 需要删除的出差报销主键
     * @return 结果
     */
    @Override
    public int deleteBusinessTripReimbursementByIds(Long[] ids)
    {
        return businessTripReimbursementMapper.deleteBusinessTripReimbursementByIds(ids);
    }

    /**
     * 删除出差报销信息
     * 
     * @param id 出差报销主键
     * @return 结果
     */
    @Override
    public int deleteBusinessTripReimbursementById(Long id)
    {
        return businessTripReimbursementMapper.deleteBusinessTripReimbursementById(id);
    }
}
